export function showSuccess(title, duration) {
  const time = duration || 2000;
  wx.showToast({
    title,
    icon: 'success',
    time,
  });
}
export function showFail(title, duration) {
  const time = duration || 2000;
  wx.showToast({
    title,
    image: '/static/images/ico_warning.png',
    time,
  });
}